package com.heima.model.article.dtos;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "文章收藏DTO")
public class CollectionBehaviorDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotBlank
    @ApiModelProperty("文章ID")
    private long entryId;

    @Min(value = 0, message = "operation：0，收藏，1，取消收藏")
    @Min(value = 1, message = "operation：0，收藏，1，取消收藏")
    @ApiModelProperty("0，收藏，1，取消收藏")
    private short operation;

    @ApiModelProperty("发布时间")
    private Date publishedTime;

    @Min(value = 0, message = "type：0，文章，1，动态")
    @Min(value = 1, message = "type：0，文章，1，动态")
    @ApiModelProperty("0，文章，1，动态")
    private short type;
}
